Home  |  About  | Last |  Submit  |  Contact
AllQuests.com




Previous Question:  on Zina MP3 streamer script  Scripts and Online ServicesNext Question:  Question About 2Checkout  eCommerce
Question [ubuntu] run tomcat 5.5 as daemon ( Ubuntu Forums General Help )
Updated: 2008-08-12 05:51:09 (3)
[ubuntu] run tomcat 5.5 as daemon

Hi everybody,
I'm currently able to initialize tomcat properly from command line.
Yet, having trouble configuring it property to run as daemon.
How to configure tomcat 5.5 to run as a daemon?
Thanks in advance,
Asaf

Answers: [ubuntu] run tomcat 5.5 as daemon ( Ubuntu Forums General Help )
[ubuntu] run tomcat 5.5 as daemon

See if this post helps:

http://ubuntuforums.org/showthread.php?t=44006

hal8000

[ubuntu] run tomcat 5.5 as daemon

Quote:
Originally Posted by hal8000
See if this post helps:

http://ubuntuforums.org/showthread.php?t=44006
I followed the enclosed article. And when I am running the following command (which is not as a daemon. i just wanted to make sure it works before restarting):
Code:
sh /etc/init.d/tomcat start
I get the following output:
$ sh /etc/init.d/tomcat start
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-1.5.0-sun-1.5.0.15
touch: cannot touch `/usr/local/tomcat/logs/catalina.out': Permission denied
/usr/local/tomcat/bin/catalina.sh: 340: cannot create /usr/local/tomcat/logs/catalina.out: Permission denied

What security settings are required for it run properly?

asaf.lahav

[ubuntu] run tomcat 5.5 as daemon

OK... I modified the permissions and now tomcat runns perfectly when I initiate it from command line.
But I'm still unable to get it to run as a daemon.

Here is the script I put in the init.d dir:
#!/bin/bash
#
# Startup script for the Tomcat server
#
# chkconfig: - 83 53
# description: Starts and stops the Tomcat daemon.
# processname: tomcat
# pidfile: /var/run/tomcat.pid


# See how we were called.
case $1 in
start)

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.15
export CLASSPATH=/usr/local/tomcat/common/lib/servlet-api.jar
export CLASSPATH=/usr/local/tomcat/common/lib/jsp-api.jar
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
*)
echo "Usage: /etc/init.d/tomcat start|stop|restart"
;;
esac

exit 0

Why doesn't it fire properly?

asaf.lahav

Previous Question:  on Zina MP3 streamer script  SitePoint Forums  Scripts and Online ServicesNext Question:  Question About 2Checkout  SitePoint Forums  eCommerce

- Source: [ubuntu] run tomcat 5.5 as daemon Ubuntu Forums General Help
- Previous Question: on Zina MP3 streamer script SitePoint Forums Scripts and Online Services
- Next Question: Question About 2Checkout SitePoint Forums eCommerce